//
//  UIButton+Extension.h
//  Practice
//
//  Created by yons on 14.8.20.
//  Copyright © 2020 yons. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIButton (Extension)

/// type+图片名
/// @param buttonType 类型
/// @param named 图片名称
+ (UIButton *)buttonWithType:(UIButtonType)buttonType normalImageNamed:(NSString *)named;

/// type+图片名+高亮
/// @param buttonType 类型
/// @param named 图片名称
/// @param selectNamed 高亮图片名称
+ (UIButton *)buttonWithType:(UIButtonType)buttonType normalImageNamed:(NSString *)named selectImageNamed:(NSString *)selectNamed;

/// type+图片名+target+方法+事件
/// @param buttonType 类型
/// @param named 图片名称
/// @param target target
/// @param action action
/// @param controlEvents controlEvents
+ (UIButton *)buttonWithType:(UIButtonType)buttonType normalImageNamed:(NSString *)named addTarget:(nullable id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents;

/// type+图片名+高亮+target+方法+事件
/// @param buttonType 类型
/// @param named 图片名称
/// @param selectNamed 高亮图片名称
/// @param target target
/// @param action action
/// @param controlEvents controlEvents
+ (UIButton *)buttonWithType:(UIButtonType)buttonType normalImageNamed:(NSString *)named selectImageNamed:(NSString *)selectNamed addTarget:(nullable id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents;

/// (路径)type+图片名
/// @param buttonType type
/// @param named 图片名称
+ (UIButton *)buttonWithType:(UIButtonType)buttonType normalImageContentsOfFileNamed:(NSString *)named;

/// (路径)type+图片名+高亮
/// @param buttonType type
/// @param named 图片名
/// @param selectNamed 高亮图片名
+ (UIButton *)buttonWithType:(UIButtonType)buttonType normalImageContentsOfFileNamed:(NSString *)named selectImageContentsOfFileNamed:(NSString *)selectNamed;

/// type+文本+文本颜色+文本大小+字重
/// @param buttonType type
/// @param text 文本
/// @param textColor 文本颜色
/// @param size 文本大小
/// @param weight 字重
+ (UIButton *)buttonWithType:(UIButtonType)buttonType text:(NSString *)text textColor:(UIColor *)textColor fontSize:(CGFloat)size weight:(UIFontWeight)weight;

/// type+文本+文本颜色+文本大小+target+方法+事件+字重
/// @param buttonType type
/// @param text 文本
/// @param textColor 文本颜色
/// @param size 文本大小
/// @param weight 字重
/// @param target target
/// @param action 方法
/// @param controlEvents 事件
+ (UIButton *)buttonWithType:(UIButtonType)buttonType text:(NSString *)text textColor:(UIColor *)textColor fontSize:(CGFloat)size weight:(UIFontWeight)weight addTarget:(nullable id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents;


/// type+文本+文本颜色+文本大小+字重+剪切半径
/// @param buttonType type
/// @param text 文本
/// @param textColor 文本颜色
/// @param size 文本大小
/// @param weight 字重
/// @param radius 剪切半径
+ (UIButton *)buttonWithType:(UIButtonType)buttonType text:(NSString *)text textColor:(UIColor *)textColor fontSize:(CGFloat)size weight:(UIFontWeight)weight radius:(CGFloat)radius;

/// type+文本+文本颜色+文本大小+字重+剪切半径+target+方法+事件
/// @param buttonType type
/// @param text 文本
/// @param textColor 文本颜色
/// @param size 文本大小
/// @param radius 剪切半径
/// @param target target
/// @param action 方法
/// @param controlEvents 事件
+ (UIButton *)buttonWithType:(UIButtonType)buttonType text:(NSString *)text textColor:(UIColor *)textColor fontSize:(CGFloat)size weight:(UIFontWeight)weight radius:(CGFloat)radius addTarget:(nullable id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents;

/// type+文本+文本颜色+文本大小+字重+剪切半径+边框宽度+边框颜色
/// @param buttonType type
/// @param text 文本
/// @param textColor 文本颜色
/// @param size 文本大小
/// @param weight 字重
/// @param radius 剪切半径
/// @param borderWidth 边框宽度
/// @param borderColor 边框颜色
+ (UIButton *)buttonWithType:(UIButtonType)buttonType text:(NSString *)text textColor:(UIColor *)textColor fontSize:(CGFloat)size weight:(UIFontWeight)weight radius:(CGFloat)radius borderWidth:(CGFloat)borderWidth borderColor:(UIColor *)borderColor;

/// type+文本+文本颜色+文本大小+字重+剪切半径+边框宽度+边框颜色+target+方法+事件
/// @param buttonType type
/// @param text 文本
/// @param textColor 文本颜色
/// @param size 文本大小
/// @param weight 字重
/// @param radius 剪切半径
/// @param borderWidth 边框宽度
/// @param borderColor 边框颜色
/// @param target target
/// @param action 方法
/// @param controlEvents 事件
+ (UIButton *)buttonWithType:(UIButtonType)buttonType text:(NSString *)text textColor:(UIColor *)textColor fontSize:(CGFloat)size weight:(UIFontWeight)weight radius:(CGFloat)radius borderWidth:(CGFloat)borderWidth borderColor:(UIColor *)borderColor addTarget:(nullable id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents;

@end

NS_ASSUME_NONNULL_END
